package com.qf.test;

import com.qf.service.UserService;
import com.sun.org.apache.bcel.internal.generic.NEW;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/8/27 9:39
 */
public class Demo {
    @Test
    public void test01(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = context.getBean(UserService.class);
        userService.addUser();
    }
    @Test
    public void test02(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = context.getBean(UserService.class);
        int i = userService.addUser(10);
        System.out.println("i = " + i);
    }
}
